package path

import "strings"

type pathBuilder struct {
	i int
	b strings.Builder
}

func (p *pathBuilder) append(x string) {
	if p.i > 0 {
		_ = p.b.WriteByte('/')
	}
	_, _ = p.b.WriteString(x)
	p.i++
}

func (p *pathBuilder) String() string { return p.b.String() }
